<h1>Editing code_file</h1>

<%= error_messages_for :code_file %>

<% form_for(:code_file, :url => widget_code_file_path(@widget, @code_file), :html => {:method => :put, :onsubmit => "document.getElementById('code_file_code_hidden').value = code_file_code.getCode();"}) do |f| %>
  <%= render :partial => "form", :locals => {:f => f} %>
  <p>
    <%= f.submit "Update" %>
  </p>
<% end %>

<%= link_to 'Back', widget_code_files_path(@widget) %>
